.class public Ldgb/p0;
.super Ljava/lang/Object;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Ldgb/p0$b;
    }
.end annotation


# static fields
.field private static volatile a:Ldgb/p0;

.field private static b:Ldgb/p0$b;

.field private static c:Landroid/content/Context;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    sput-object p1, Ldgb/p0;->c:Landroid/content/Context;

    .line 3
    new-instance v0, Ldgb/p0$b;

    const/4 v1, 0x0

    invoke-direct {v0, p0, p1, v1}, Ldgb/p0$b;-><init>(Ldgb/p0;Landroid/content/Context;Ldgb/p0$a;)V

    sput-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    return-void
.end method

.method public static a(Landroid/content/Context;)Ldgb/p0;
    .locals 2

    .line 1
    sget-object v0, Ldgb/p0;->a:Ldgb/p0;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Ldgb/p0;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Ldgb/p0;->a:Ldgb/p0;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Ldgb/p0;

    invoke-direct {v1, p0}, Ldgb/p0;-><init>(Landroid/content/Context;)V

    sput-object v1, Ldgb/p0;->a:Ldgb/p0;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception p0

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p0

    .line 6
    :cond_1
    :goto_0
    sget-object p0, Ldgb/p0;->a:Ldgb/p0;

    return-object p0
.end method


# virtual methods
.method public a(Ljava/lang/String;I)Z
    .locals 3

    .line 7
    :try_start_0
    sget-object v0, Ldgb/p0;->c:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {v0, p1, p2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 8
    sget-boolean v1, Ldgb/o0;->b:Z

    if-eqz v1, :cond_0

    .line 9
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Can not use SystemSettings in this phone"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/s0;->c(Ljava/lang/String;)V

    .line 10
    :cond_0
    :goto_0
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2}, Ldgb/p0$b;->a(Ldgb/p0$b;Ljava/lang/String;I)Z

    move-result p1

    return p1
.end method

.method public a(Ljava/lang/String;J)Z
    .locals 3

    .line 15
    :try_start_0
    sget-object v0, Ldgb/p0;->c:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {v0, p1, p2, p3}, Landroid/provider/Settings$System;->putLong(Landroid/content/ContentResolver;Ljava/lang/String;J)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 16
    sget-boolean v1, Ldgb/o0;->b:Z

    if-eqz v1, :cond_0

    .line 17
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Can not use SystemSettings in this phone"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/s0;->c(Ljava/lang/String;)V

    .line 18
    :cond_0
    :goto_0
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2, p3}, Ldgb/p0$b;->a(Ldgb/p0$b;Ljava/lang/String;J)Z

    move-result p1

    return p1
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 3

    .line 11
    :try_start_0
    sget-object v0, Ldgb/p0;->c:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {v0, p1, p2}, Landroid/provider/Settings$System;->putString(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 12
    sget-boolean v1, Ldgb/o0;->b:Z

    if-eqz v1, :cond_0

    .line 13
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Can not use SystemSettings in this phone"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ldgb/s0;->c(Ljava/lang/String;)V

    .line 14
    :cond_0
    :goto_0
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2}, Ldgb/p0$b;->a(Ldgb/p0$b;Ljava/lang/String;Ljava/lang/String;)Z

    move-result p1

    return p1
.end method

.method public b(Ljava/lang/String;I)I
    .locals 2

    .line 1
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2}, Ldgb/p0$b;->b(Ldgb/p0$b;Ljava/lang/String;I)I

    move-result v0

    if-eq v0, p2, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    :try_start_0
    sget-object v1, Ldgb/p0;->c:Landroid/content/Context;

    .line 3
    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    invoke-static {v1, p1, p2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move v0, p1

    goto :goto_0

    :catch_0
    move-exception p1

    .line 4
    sget-boolean p2, Ldgb/o0;->b:Z

    if-eqz p2, :cond_1

    .line 5
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Can not use SystemSettings in this phone"

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ldgb/s0;->c(Ljava/lang/String;)V

    :cond_1
    :goto_0
    return v0
.end method

.method public b(Ljava/lang/String;J)J
    .locals 3

    .line 11
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2, p3}, Ldgb/p0$b;->b(Ldgb/p0$b;Ljava/lang/String;J)J

    move-result-wide v0

    cmp-long v2, v0, p2

    if-eqz v2, :cond_0

    goto :goto_0

    .line 12
    :cond_0
    :try_start_0
    sget-object v2, Ldgb/p0;->c:Landroid/content/Context;

    .line 13
    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    invoke-static {v2, p1, p2, p3}, Landroid/provider/Settings$System;->getLong(Landroid/content/ContentResolver;Ljava/lang/String;J)J

    move-result-wide p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-wide v0, p1

    goto :goto_0

    :catch_0
    move-exception p1

    .line 14
    sget-boolean p2, Ldgb/o0;->b:Z

    if-eqz p2, :cond_1

    .line 15
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string p3, "Can not use SystemSettings in this phone"

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ldgb/s0;->c(Ljava/lang/String;)V

    :cond_1
    :goto_0
    return-wide v0
.end method

.method public b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    .line 6
    sget-object v0, Ldgb/p0;->b:Ldgb/p0$b;

    invoke-static {v0, p1, p2}, Ldgb/p0$b;->b(Ldgb/p0$b;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eq v0, p2, :cond_0

    goto :goto_0

    .line 7
    :cond_0
    :try_start_0
    sget-object p2, Ldgb/p0;->c:Landroid/content/Context;

    .line 8
    invoke-virtual {p2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object p2

    invoke-static {p2, p1}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-object v0, p1

    goto :goto_0

    :catch_0
    move-exception p1

    .line 9
    sget-boolean p2, Ldgb/o0;->b:Z

    if-eqz p2, :cond_1

    .line 10
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Can not use SystemSettings in this phone"

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ldgb/s0;->c(Ljava/lang/String;)V

    :cond_1
    :goto_0
    return-object v0
.end method
